# 招聘信息序列化器
from rest_framework import serializers
from apps.recruit.models import Recruit
from .EnterpriseSerializer import EnterpriseModelSerializer


# 职位信息
class JobObtainModelSerializer(serializers.ModelSerializer):
    enterprise = EnterpriseModelSerializer()  # 内层嵌套：多查一
    class Meta:
        model = Recruit
        fields = ('id','jobname','salary','condition','education','type',
                  'city','createtime','enterprise','labels')
